import request from "@/utils/request.js"
import {
	API
} from "@/utils/api.js"

export function shoot_add(data) {
	//发布我的随手拍
	return request.post({
		url: "/index/info/shoot_add",
		data
	})
}

export function my_info() {
	//获取用户的信息
	return request.get({
		url: "/index/info/my_info"
	})
}

export function edit_info(data) {
	//修改用户信息
	return request.post({
		url: "/index/info/edit_info",
		data
	})
}

export function comment_add(data) {
	//添加评论或回复
	return request.post({
		url: "/index/info/comment_add",
		data
	})
}

export function article_add(data) {
	//用户发布文章
	return request.post({
		url: "/index/info/article_add",
		data
	})
}

export function edit_image(file) {
	//用户发布文章
	return request.post({
		url: "/index/info/edit_image",
		data: {
			file
		}
	})
}

export const upload_outimg = API + "/index/index/upload_outimg"; //头像上传接口

export function send_room_info(data) {
	//聊天室发送消息
	return request.post({
		url: "/index/info/send_room_info",
		data
	})
}